package com.dal.job;

import com.dal.db.DbSave;
import com.xiaoleilu.hutool.log.Log;
import com.xiaoleilu.hutool.log.LogFactory;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

/**
 * @author : DengYing
 * @CreateDate : 2017年4月29日 上午12:00:38
 * @Description ：数据定时存储器
 */
public class DBSaveJob implements Job {
	static Log log = LogFactory.get(DBSaveJob.class);
	@Override
	public void execute(JobExecutionContext context) throws JobExecutionException {
		try {
			DbSave.saveAll();
			log.info("-> save database all");
		} catch (Exception e) {
			log.error(e);
		}
	}

}
